package studentsystem;

import java.util.Scanner;

public class Menu {
    Scanner in = new Scanner(System.in);
    private int a = 3;

    Menu() {
        while (a != 0) {
            System.out.println("------------------");
            System.out.println("1：排名");
            System.out.println("2：科目成绩");
            System.out.println("0：返回");
            System.out.println("请输入0-2：");
            a = in.nextInt();
            switch (a) {
                case 0:
                    System.out.println("返回成功！");
                    System.out.println();
                    break;
                case 1:
                    new Rank();
                    break;
                case 2:
                    new Subject();
                    break;
                default:
                    System.out.println("输入有误！");
            }

        }
    }

    public static void main(String[] args) {
        new Menu();
    }
}